home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 166 / 166.d81 / b.fox & hounds (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  23KB  |  608 lines

  1. 1 poke 55,0:poke 56,112:clr:poke788,49:tq=ti:poke53371,0
  2. 2 dv=peek(186):if dv<8 then dv=8
  3. 3 poke53281,0:poke53280,0:print"":poke2024,dv:gosub60000
  4. 4 sys57812"newfont5/sprite3",dv,0:poke780,0:poke 781,0:poke 782,112:sys65493
  5. 5 sys57812"mr.mouse 9000"   ,dv,0:poke780,0:poke 781,0:poke 782,144:sys65493
  6. 6 dv=peek(2024):rem can rerun from here without loading files again.
  7. 7 poke 53269,0: rem all sprites off
  8. 8 ml=36864:v=ml+111
  9. 9 if peek(788)=64 and peek(789)=148 then sysml+3
  10. 10 rem"  [198][200]64.13  by [196]avid [218]ammat  [202]anuary 17, 1988
  11. 11 [143]"  ascox &closeleft$ounds on text screen with custom characters
  12. 12 rem to restore normal edit screen       press "run/stop" and goto 600.
  13. 14 ifti<tq+200then14
  14. 20 poke   53280,5
  15. 25 gosub 250 : rem show title screen
  16. 26 gosub 100 : rem initialize variables
  17. 30 gosub 700: rem show scrolling animal sprites all 4 at once
  18. 31 rem gosub 281:poke 53269,0:              rem print animal graphic strings
  19. 32 gosub 800
  20. 33 rem    gosub 282:poke 53269,0
  21. 34 gosub 900
  22. 35 gosub 283:poke 53269,0
  23. 36 poke214,18:print:poke211,2:print   "[144][208]ress[157][157][157][157][157]a key.":gosub 282:gosub 281
  24. 37 get k$:if k$="" then 37 :rem key pressed
  25. 38 wait 203,64:rem no key pressed
  26. 39 sc=30720:for a=sc+2043 to sc+2047:poke a ,229 :next:rem sprites 4-8 pointers
  27. 40 poke sc+ 2041,228 :poke sc+2042,228:rem pointers for sprites 2 and 3
  28. 41 for n=53287 to 53294:poke n,0:next :rem sprite colors
  29. 43 poke 53269,0:poke 53264,0
  30. 44 gosub 650 : gosub 150 : gosub 680:   rem print information, start mr. mouse
  31. 45 gosub 120 : rem select game
  32. 46 if k$="l" then 605
  33. 48 gosub 620 : rem draw board and animals
  34. 49 gosub 165 : rem define regions for game
  35. 50 rem  k$(1)="a":k$(2)="s":k$(3)="z":k$(4)="x":k$(5)="f":k$(6)="h":k$(7)="l"
  36. 51 gosub 390 : rem draw fox & hounds on board
  37. 52 gosub 380 : rem draw large sprite heads
  38. 53 goto 60
  39. 54 if k$="l" then 605
  40. 55 gosub 390 : rem new game: draw fox & hounds on board
  41. 60 if k$="f" then k$=" ":gosub 170:sysml+21,18,6 :gosub 1000:goto 54
  42. 65 if k$="h" then k$=" ":gosub 180:sysml+21,18,19:gosub 2000:goto 54
  43. 70 end
  44. 80 rem-quick restart-----
  45. 81 bk=-1:print"[147]":poke 53269,0:goto45
  46. 100 :rem   --------initialize variables------------
  47. 101 c=0:r=0:x=0:y=0:n=0:cf=0:rf=0:cn=0:rn=0:h=5:w=0:bk=-1:wh=0:wf=0
  48. 102 sr=0:cs=0:rs=0:ac=0:d=0:h=5:t=0:l=0:sc=0:ba=33792
  49. 103 dim f(9,9),x(9,9),y(9,9),c(4),r(4),n(8,8)
  50. 104 for r=0 to 9:f(0,r)=3:f(9,r)=3:next:for c=1 to 8:f(c,0)=3:f(c,9)=3:next
  51. 105 y=210:forr=0to9:x=104:forc=0to9:x(c,r)=x:y(c,r)=y:x=x+16:next:y=y-16:next
  52. 106 f(1,1)=5:f(3,1)=6:f(5,1)=7:f(7,1)=8:f(4,8)=2:cf=4:rf=8
  53. 107 c(1)=1:r(1)=1:c(2)=3:r(2)=1:c(3)=5:r(3)=1:c(4)=7:r(4)=1
  54. 108 wh$="  [157][157]  ":gy$="[155]  [157][157]  ":lr$="[150]  [157][157]  ":gn$="  [157][157]  "
  55. 109 return
  56. 120 rem   select game and play using        keyboard, joystick, or mouse in any
  57. 121 rem   combination.
  58. 122 k$(5)="f":k$(6)="h":k$(7)="l": wait 203,64:wait 56320,127:wait 56321,255
  59. 123 get k$:: if k$="" and peek(56320)=127and peek(56321)=255then123
  60. 124 if peek(56320)=111 or peek(56321)=239 then sys ml+9
  61. 125 if rg%>4 and rg%<8 then k$=k$(rg%):     return
  62. 126 if k$  <>"" then wait 203,64:goto 130
  63. 128 goto 122
  64. 130 rem select game by keyboard
  65. 131 print "[147]" tab(12) "[212]o [211]elect [199]ame:"
  66. 132 print "[208]ress [198] to play [198]ox; [200] to play [200]ounds."
  67. 133 print"[195]omputer plays the other side."
  68. 134 print "[208]ress [204] to return to [204]oadstar."
  69. 135 get k$:if k$="" then 135
  70. 136 if k$="l" then return
  71. 137 if k$="h" then return
  72. 138 if k$="f" then return
  73. 139 goto 135
  74. 150 rem ----- start mr. mouse ------
  75. 151 sys 36864+21,0,0   :rem position
  76. 152 ml=36864:v=ml+111:sysml:sysml+6:poke 53269,0 :poke v,123:poke v+1,7
  77. 153 for c=704 to 767: poke c+30400,peek(c):next:rem copy sprite to unused area
  78. 154 sysml+3:   poke 32760,230:rem pointer to sprite #1 (mouse pointer)
  79. 155 poke 53287,2 :rem color red
  80. 156 sysml+15,5,31,33,19,19:sysml+15,6,26,28,20,20:sysml+15,7,3,5,22,22
  81. 157 get k$:if k$="" then 157:rem wait for key press
  82. 158 wait 203,64:rem wait for key release
  83. 159 sysml+21,18,22:sysml:poke 53269,1:             return
  84. 160 rem --,- set fox regions ---------
  85. 161 sysml+15,1, 8+2*cf, 9+2*cf,18-2*rf,19-2*rf:rem a
  86. 162 sysml+15,2,12+2*cf,13+2*cf,18-2*rf,19-2*rf:rem s
  87. 163 sysml+15,3, 8+2*cf, 9+2*cf,22-2*rf,23-2*rf:rem z
  88. 164 sysml+15,4,12+2*cf,13+2*cf,22-2*rf,23-2*rf:return:rem x ------------------
  89. 165 sysml+15,5,25,27,23,23 :rem set regions for f, h, l
  90. 166 sysml+15,6, 7, 9,23,23
  91. 167 sysml+15,7,10,12,24,24
  92. 169 return:rem -----------------------
  93. 170 print "[144]"tab(13)"[198]ox and [200]ounds"
  94. 171 poke214,17:print:poke211,1:print"          ":print tab(6)" "
  95. 172 poke214,1 :print:poke211,1:print" [217]ou play [198]ox. [195]omputer plays [200]ounds. "
  96. 173 poke214,20:print:poke211,1:print" [208]ress [193], [211], [218],[160]or [216] to move [198]ox.   "
  97. 174 print"[160]          [212]o start new game:"
  98. 175 print"  [208]ress([200])[144]to play [200]ounds,([198])[144]to play [198]ox.";
  99. 176 print "     [208]ress([204])[144]to return to [204]oadstar. ";
  100. 178 gosub 193
  101. 179 return
  102. 180 print "[144]"tab(13)"[198]ox and [200]ounds":poke 214,18:print:poke 211,6:print"1"
  103. 181 poke214,17:print:poke 211,1:print"[205]ove [200]ound"
  104. 182 poke214,1 :print:poke 211,1:print" [217]ou play [200]ounds. [195]omputer plays [198]ox. "
  105. 183 poke214,20:print:poke 211,1:print" 1, 2, 3, or 4 selects [200]ound; [209] or [215]";
  106. 184 poke214,21:print:poke211,1:print" moves.   [212]o start new game:"  ;
  107. 185 poke214,22:print:poke211,1
  108. 186 print" [208]ress([200])[144]to play [200]ounds,([198])[144]to play [198]ox." ;
  109. 187 print "     [208]ress([204])[144]to return to [204]oadstar. ";
  110. 188 ml=36864:gosub 190:rem set regions for hounds
  111. 189 gosub 194:return:rem define k$(rg%)
  112. 190 rem set regions of 4 hounds
  113. 191 for c=1 to 4:sysml+15,c,10+2*c(c),11+2*c(c),20-2*r(c),21-2*r(c):next:
  114. 192 poke v+1,7:return
  115. 193 k$(1)="a":k$(2)="s":k$(3)="z":k$(4)="x":k$(5)="f":k$(6)="h":k$(7)="l":return
  116. 194 k$(1)="1":k$(2)="2":k$(3)="3":k$(4)="4":k$(5)="f":k$(6)="h":k$(7)="l":return
  117. 250 q$=chr$(34): rem  title screen
  118. 251 poke 53272  ,252:rem put screen at 29696 and font at 30720 in video bank 1
  119. 252 poke53280,1 :poke 53281,1:poke 56576,198:poke 648,124:print"[147]";
  120. 253 rem the font has no reversed space character, so no cursor on screen.
  121. 254 for x=29952 to 29959  :poke x,255:next :rem now have cursor
  122. 255 h1$="[144]!"+q$+q$+"[157]"+"#$%[146]"
  123. 256 rem h1$="[144]"+chr$(33)+chr$(34)+chr$(34)+"[157]"+chr$(35) thru chr$(37)+"[146]"
  124. 257 h2$="[144][161][162][163][164][165][146]"                :rem     h2$="[144]"+chr$(225)thru chr$(229)+"[146]"
  125. 258 f1$="-./01[146]"                :rem     f1$=""+chr$(45) thru chr$(49)+"[146]"
  126. 259 f2$="[173][174][175][176][177][146]"                :rem    f2$=""+chr$(237) thru chs$(241)+"[146]"
  127. 260 t1$="[149]@abcdefghijklmnopqrstuvwxyz[\]^_[192][146]"
  128. 261 t2$="[149][192][193][194][195][196][197][198][199][200][201][202][203][204][205][206][207][208][209][210][211][212][213][214][215][216][217][218][219][220][221][255][223][160][146]"
  129. 262 f$=f1$+"[157][157][157][157][157]"+f2$+"[145]" : h$=h1$+"[157][157][157][157][157]"+h2$+"[145]"
  130. 263 poke214,10:print: print "    "t1$:print "    " t2$
  131. 264 print "[149][204]oadstar presents"
  132. 265 :
  133. 266 print "[193][160][200]unt [199]ame"
  134. 267 print "[207]n a [195]hecker [194]oard"
  135. 268 print "[149]by[160][196]avid [218]ammat"
  136. 275 poke 214,4:print:poke 211,1:print"[157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166]"
  137. 276 poke 214,5: print:poke 211,40:print"[157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166][157][166]"
  138. 277 poke214,5: print:poke211,0:print"[149][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]"
  139. 278 poke214,17:print:poke211,0:print"[149][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][16